home *** CD-ROM | disk | FTP | other *** search
- // Script in this file is for the text input ActiveX Control
-
- function txtInputMouseOver(item)
- {
- // This function is called from the behavior file TextInput.htc. It places focus on the text input control
- // when it gets a mouseover event
-
- // if this is the first mouseover event that fires automatically when the page loads, return
- // see comments in Hilite.js for an explanation of this
- if (bFirstMouseover == true) return
-
- // make sure item is focusable
- if (event.srcElement.MCFocusable != "true" || event.srcElement.MCTempUnFocusable == "true") return
- // focus on item
- oCurFocus = item
- oCurFocus.focus()
- }
-
-
- function txtInputHilite(item)
- {
- // This function highlights control to indicate it has focus; actually it is the control's
- // parent HTML element that gets the highlight
-
- // make sure item is focusable
- if (item.MCFocusable != "true") return
-
- // assign element its new class for highlighting
- item.parentElement.className = item.parentElement.className + "_hilite"
- // Call built-in function on the control to set focus
- item.SetInputFocus()
- }
-
- function txtInputRestore(item)
- {
- // this function restores non-highlight state to the control's parent HTML element
-
- // make sure item is focusable
- if (item.MCFocusable != "true") return
- // identify class name of parent element
- var c = item.parentElement.className
- // if class name does not end in "_hilite", exit function
- if (c.substring((c.length -7), c.length) != "_hilite") return
- // remove "_hilite" from class name to return to unhighlighted state
- item.parentElement.className = c.substring(0,(c.length -7))
- }